package com.yztc.utils;

import android.content.Context;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.Toast;

/**
 * Created by My on 2016/10/19.
 */
public class ToastHelper {

    public static void toast(Context context,String msg,int id){
        Toast toast = Toast.makeText(context,msg,Toast.LENGTH_SHORT);
        ImageView iv = new ImageView(context);
        iv.setImageResource(id);
        LinearLayout linearLayout = (LinearLayout) toast.getView();
        linearLayout.setOrientation(LinearLayout.VERTICAL);
        linearLayout.addView(iv,0);
        toast.show();
    }
}
